<?php
/**
* Class for "version" models.
*
* Copyright (c) 2009 James Gauld <james@jamesgauld.net>
* This file is part of Scribble.
* @license http://www.scribblecms.co.uk/license.txt
*
* @package Scribble
*/
class ScribbleVersionModel extends ScribbleModel {

	/**
	* Return the "master" model related to this version.
	*
	* @return ScribbleMasterModel
	*/
	public function findMaster() {
		return $this->findRelatives(substr($this->modelName, 0, -7), 'master')->get(0);
	}
}
?>